#!/bin/bash

SERVER_JAR_NAME="/data/cloud/nbsaas-mall2-admin.jar"

JAVA_OPTS="-Xms1024m -Xmx1024m -Xmn512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200"
JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:file=./logs/gc.log:time,uptime:filecount=10,filesize=10M"
JAVA_OPTS="$JAVA_OPTS -XX:MaxDirectMemorySize=512m -Xss512k -Dfile.encoding=utf-8"

# 启动 Java 应用程序
nohup java $JAVA_OPTS -jar  $SERVER_JAR_NAME >./logs/admin.out 2>&1 &
